<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
// import { ORIGINAL_THEME } from '@/utils'
import changeTheme from '@/utils/theme'

export default {
  name: 'App',
  mounted () {
    const theme = this.$store.state.user.theme
    changeTheme(theme, '#2784f4')

    const resizeHandler = () => {
      const innerWidth = document.documentElement.offsetWidth
      this.$store.commit('SET_IS_COLLAPSED', innerWidth < 1330)
    }
    window.addEventListener('resize', resizeHandler, false)
    resizeHandler()
  }
}
</script>

<style lang="scss">
  #app {
    background: #f9f9f9;
    font-size: 14px;
    color: #606266;
  }
</style>
